package cn.fay.chapter05;

public enum Test21 {
	FEN,JIAO,YUAN,WUYUAN,SHIYUAN,BAIYUAN;
	
	public static void main(String[] args) {
		Test21 hb1 = Test21.FEN;
		for (Test21 hb : Test21.values()) {
			System.out.println(hb+".ordinal= "+hb.ordinal());
		}
		switch (hb1) {
		case FEN:
			System.out.println("分");
			break;
		case JIAO:
			System.out.println("角");
			break;
		case YUAN:
			System.out.println("元");
			break;
		case WUYUAN:
			System.out.println("五元");
			break;
		case SHIYUAN:
			System.out.println("十元");
			break;
		case BAIYUAN:
			System.out.println("百元");
			break;
		default:
			break;
		}
	}
}
